﻿#ifndef USERDETAILDLG_H
#define USERDETAILDLG_H

#include <QWidget>
#include <QJsonObject>
#include <QBoxLayout>
#include <QPushButton>
#include <QLabel>
#include "SSwitchButton.h"
#include <QFormLayout>
#include "eventfilterobject.h"
#include <QPixmap>
#include "SApp.h"
#include "SHttpClient.h"
#include "UserDetail_toEditUserDlg.h"
#include <QMessageBox>
#include <QEvent>
#include <QStandardPaths>
#include <QFileDialog>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QHttpMultipart>
#include <QHttpPart>
#include "UserDetail_toModifyPasswordDlg.h"
#include "MaskWidget.h"




class UserDetailShowDlg : public QWidget
{
	Q_OBJECT
private:
	QJsonObject m_user;
	QJsonObject m_Olduser;

	QPushButton* m_closeBtn{};
	QPushButton* m_backBtn;

	QLabel* m_avatar_lab{};				//用户头像
	QLabel* m_user_id_lab{};
	QLabel* m_username_lab{};
	QLabel* m_mobile_lab{};
	QLabel* m_email_lab{};
	SSwitchButton* m_isenable_btn{};


	QPushButton* m_editBtn{};
	QPushButton* m_resetpwBtn{};
	QPushButton* m_deluserBtn{};
	QPushButton* m_avatar_modifyBtn{};


	UserDetail_toEditUserDlg* m_edituserDlg{};
	UserDetail_toModifyPasswordDlg* m_modifypasswordDlg{};

signals:
	void userDataChanged(const QJsonObject& object);
	void userDataDeleted(const QJsonObject& object);
public:
	UserDetailShowDlg(QWidget* parent = nullptr);

	void init();

	void setUserData(const QJsonObject& object);
	void updateUi();

	void UserAvatar_Get_DownLoad();

	void connectinit();

public:
	void UserAvatar_Post_Update();

public:



};

#endif // !USERDETAILDLG_H
